<div id="DIV1" style="width:100px; overflow:hidden; text-overflow:ellipsis; border:1px solid red;">
    XXXXXXXXXXXXXXXXXXXXXXXXX
    <span style="background-color: silver;">
        <span>XXXXXXXXXXXXXXXXXXXXXXXXX</span>
    </span>
</div>
<br/>
<div id="DIV2" style="width:100px; overflow:hidden; text-overflow:ellipsis; border:1px solid red;">
    XXXXXXXXXXXXXXXXXXXXXXXXX
    <div>XXXXXXXXXXXXXXXXXXXXXXXXX</div>
    <span style="background-color: silver;">
        <span>XXXXXXXXXXXXXXXXXXXXXXXXX</span>
    </span>
</div>